
package Network;

/**
 *
  Copyright (C) 2009 BBC Research, Sam Davies, <Sam.Davies@bbc.co.uk>

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.


 */
public class Message {

    private long tag_id_bottom;
    private long slot;
    private long cell;
    private char messageType;
/**
 * Parent class for all Messages.
 * 
 * @param messageType char representing message type
 * @param tag_id_bottom Char representing the tag generating the message unique 
 * ID
 * @param slot time slot of the message
 * @param cell originating cell of the message
 */
    public Message(char messageType, long tag_id_bottom, long slot, long cell) {
        this.tag_id_bottom = tag_id_bottom;
        this.slot = slot;
        this.cell = cell;
        this.messageType = messageType;
    }

    /**
     * @return the tag_id_bottom
     */
    public long getTag_id_bottom() {
        return tag_id_bottom;
    }

    /**
     * @return the slot
     */
    public long getSlot() {
        return slot;
    }

    /**
     * @return the cell
     */
    public long getCell() {
        return cell;
    }

    @Override
    public String toString() {
        return ("Tag Id; " + this.getTag_id_bottom() + ", slot; " + this.getSlot() + ", cell; " + this.getCell());
    }

    /**
     * @return the messageType
     */
    public char getMessageType() {
        return messageType;
    }


}
